import { useState, useCallback } from "react";
/**
 * useUpdate-强制更新
 */

function useUpdate() {
  const [, setState] = useState({});

  const update = useCallback(() => {
    setState({});
  }, []);

  return update;
}

export default useUpdate;
